package com.asset.dispoal.poi.documentation;

import com.asset.dispoal.poi.documentation.api.DocumentationService;
import com.asset.dispoal.poi.documentation.dto.CaseDocumentationRequest;
import com.asset.dispoal.poi.documentation.dto.DataTableDocumentationRequest;
import com.asset.dispoal.poi.documentation.dto.DocumentationRequest;
import com.asset.dispoal.poi.documentation.dto.PlaintiffInfoRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.mhuang.pacebox.springboot.protocol.Result;

/**
 * @author qr
 * @date 2022/4/14$
 */
@RestController
@Api(value = "文书管理", tags = "文书管理")
@RequestMapping("poi/documentation")
public class DocumentationController {

    @Autowired
    DocumentationService documentationService;


    @ApiOperation(value = "文书生成", notes = "文书生成")
    @PostMapping(value = "/downloadDocument")
    public Result downloadDocument(DocumentationRequest request) {
        return documentationService.downloadDocument(request);
    }

    @ApiOperation(value = "案件文书生成", notes = "案件文书生成")
    @PostMapping(value = "/downloadCaseDocument")
    public Result downloadCaseDocument(CaseDocumentationRequest request) {
        return documentationService.downloadCaseDocument(request);
    }

    @ApiOperation(value = "下载数据清单", notes = "下载数据清单")
    @PostMapping(value = "/downloadDataTable")
    public Result downloadDataTable(DataTableDocumentationRequest request) {
        return documentationService.downloadDataTable(request);
    }

    @ApiOperation(value = "原告主体资料下载", notes = "原告主体资料下载")
    @PostMapping(value = "/downloadPlaintiffInfo")
    public Result downloadPlaintiffInfo(PlaintiffInfoRequest request) {
        return documentationService.downloadPlaintiffInfo(request);
    }
}
